Skip to content

Conversation

@SigureMo
Copy link
Member

@SigureMo SigureMo commented Jan 7, 2026

PR Category

User Experience

PR Types

Docs

Description

更新 paddle.static.Executor 示例代码

Fixes #77193

Related links

@paddle-bot
Copy link

paddle-bot bot commented Jan 7, 2026

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@ooooo-create ooooo-create left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the example code for paddle.static.Executor to fix compatibility issues with PaddlePaddle 3.2.2's PIR (Program Intermediate Representation) mode. The changes address errors that occurred when using loss.name in the fetch_list parameter, which is no longer supported in PIR mode.

Key Changes

  • Fixed fetch_list usage to pass variable directly instead of using .name attribute
  • Removed outdated CompiledProgram example that was incompatible with PIR mode
  • Updated code block format to pycon for better xdoctest compatibility

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
python/unittest_py/requirements.txt Updated ubelt dependency from 1.3.3 to 1.4.0 for xdoctest compatibility
python/paddle/base/executor.py Fixed example code to use fetch_list=[loss] instead of fetch_list=[loss.name], removed unused import, changed to pycon format, and removed outdated CompiledProgram section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SigureMo SigureMo changed the title [CodeStyle][Xdoctest][223] Fix example code for API paddle.static.Executor [CodeStyle][Xdoctest][223] Fix example code for API paddle.static.Executor and bump test dependecy ubelt to v1.4.0 Jan 7, 2026
@SigureMo SigureMo merged commit 1d96d57 into PaddlePaddle:develop Jan 8, 2026
75 of 81 checks passed
@SigureMo SigureMo deleted the docs/example-code-executor branch January 8, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

静态图相关API,跑官网上的代码片段报错

2 participants